import java.util.ArrayList;

public class FunctionCase1 implements Function{

    @Override
    public void PrintInformation(ArrayList<Student> students) {
        for (int i = 0; i < students.size(); i++) {
            System.out.println(students.get(i).toString());
        }
    }

    @Override
    public void PrintAverageScore(ArrayList<Student> students) {
        double grade = 0;
        for (int i = 0; i < students.size(); i++) {
            grade += students.get(i).getScore();
        }
        System.out.println("班级的平均分为："+ (grade/students.size()));
    }
}
